//
//  JWBaseTableView.h
//  JW_BasePorject
//
//  Created by JW on 2018/4/12.
//  Copyright © 2018年 JW. All rights reserved.
//

#import <UIKit/UIKit.h>
@class SGParameter;

/** DZN控件的状态 */
typedef NS_ENUM(NSInteger, DZNState) {
    /** 无数据状态 */
    DZNDataEmpty = 1,
    /** 加载数据状态 */
    DZNDataLoading,
    /** 无网络状态 */
    DZNLostNetwork,

};

@interface JWBaseTableView : UITableView

//标识 tableView
@property (nonatomic,  copy) NSString *tabIdentifier;
//数据源
@property (nonatomic,strong) NSMutableArray *sourceData;


//1.设置网络请求url和参数
@property (nonatomic,  copy) NSString *url;
@property (nonatomic,strong) SGParameter *parameter;

//2.cell
@property (nonatomic,copy) NSString *cellClassName;
@property (nonatomic,copy) NSString *cellIdentifier;

//3.model
@property (nonatomic,copy) NSString *modelClassName;


//4.EmptyDataSet 设置
@property (nonatomic,copy) NSString *emptyTitle;//空白页标题
@property (nonatomic,copy) NSString *emptyMessage;//空白页文本

//图片
@property (nonatomic, copy) NSString *emptyImageName;//空白页显示的图片,若不设置则显示默认图

#pragma mark -  方法

- (void)initstance;

// 1. 注册cell
- (void)registerCellClass:(NSString *)cellClassName cellIdentifier:(NSString *)cellIdentifier modelClass:(NSString *)modelClassName;


// 2.刷新
- (void)initRefreshView;
//- (void)initRefreshView:(NSString *)modelClass;
//- (void)initRefreshViewNoFooter:(NSString *)modelClass;

//- (void)initRefreshViewNoFooter;
//- (void)refreshView;


// 3.空白
//- (void)showEmptyView;

//4.刷新数据
- (void)reloadNewData;

@end
